package org.ccvi.policy.entity.policy;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.ccvi.policy.entity.IdEntity;

@Entity
@Table(name = "pol_policy")
public class Policy extends IdEntity implements Serializable{

	private static final long serialVersionUID = -2287776720771613466L;

	private Date date;
	private boolean favorable;
	private String name;
	private String office;
	private String type;
	private String remark;
	private String catalog;
	private String riskpreferences;
	private String officetype;
	private String content;

	public Policy() {
		super();
	}

	public Policy(String type, String name, String office, Date date,
			boolean favorable,String officetype,String riskpreferences) {
		super();
		this.type = type;
		this.name = name;
		this.office = office;
		this.date = date;
		this.favorable = favorable;
		this.officetype=officetype;
		this.riskpreferences=riskpreferences;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "date_", length = 0)
	public Date getDate() {
		return date;
	}

	@Column(name = "name_", nullable = false, length = 40)
	public String getName() {
		return name;
	}

	@Column(name = "office_", length = 40)
	public String getOffice() {
		return office;
	}

	@Column(name = "type_", nullable = false, length = 20)
	public String getType() {
		return type;
	}

	@Column(name = "is_favorable", length = 1)
	public boolean isFavorable() {
		return favorable;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public void setFavorable(boolean favorable) {
		this.favorable = favorable;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setOffice(String office) {
		this.office = office;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "remark_", nullable = false, length = 100)
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "catalog_", nullable = false, length = 100)
	public String getCatalog() {
		return catalog;
	}

	public void setCatalog(String catalog) {
		this.catalog = catalog;
	}

	@Column(name = "riskpreferences_", nullable = false, length = 100)
	public String getRiskpreferences() {
		return riskpreferences;
	}

	public void setRiskpreferences(String riskpreferences) {
		this.riskpreferences = riskpreferences;
	}

	@Column(name = "office_type", length = 20)
	public String getOfficetype() {
		return officetype;
	}

	public void setOfficetype(String officetype) {
		this.officetype = officetype;
	}

	@Column(name = "content_")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
}
